package com.atguigu.tingshu.album.service;

import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.query.album.TrackInfoQuery;
import com.atguigu.tingshu.vo.album.AlbumTrackListVo;
import com.atguigu.tingshu.vo.album.TrackInfoVo;
import com.atguigu.tingshu.vo.album.TrackListVo;
import com.atguigu.tingshu.vo.album.TrackStatMqVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface TrackInfoService extends IService<TrackInfo> {

    void saveTrackInfo(Long userId, TrackInfo trackInfo);

    void saveTrackStat(Long trackId, String trackStatPlay, int i);

    Page<TrackListVo> getUserTrackPage(Page<TrackListVo> pageInfo, TrackInfoQuery trackInfoQuery);

    void updateTrackInfo(Long id, TrackInfoVo trackInfoVo);

    void removeTrackInfo(Long id);

    /**
     * 分页查询专辑下声音列表（动态判断每个声音付费标识）
     *
     * @param pageInfo 分页对象
     * @param userId   当前用户ID
     * @param albumId 专辑ID
     * @return
     */
    Page<AlbumTrackListVo> getAlbumTrackPage(Page<AlbumTrackListVo> pageInfo, Long userId, Long albumId);

    void updateTrackStat(TrackStatMqVo trackStatMqVo);

    List<Map<String, Object>> getUserFenJiPayList(Long userId, Long trackId);

    List<TrackInfo> getWaitBuyTrackInfoList(Long userId, Long trackId, Integer trackCount);
}
